<template>
  <view>
    <button @tap="showDatePicker">选择日期</button>
    <!-- <view v-if="startDate && endDate">
      已选择的开始日期为：{{ startDate }}，已选择的结束日期为：{{ endDate }}
    </view> -->
		<view class="example-body">
			<uni-datetime-picker type="daterange" disabled :clear-icon="false" v-model="range" @maskClick="maskClick"  />
		</view>
  </view>
</template>
<script>
export default {
  data() {
    return {
      // startDate: '',
      // endDate: '',
			range: ['2021-02-1', '2021-3-28'],
    }
  },
  methods: {
    maskClick (e) {
      // return
		},
    formatNum(num) {
      return num < 10 ? `0${num}` : num
    }
  }
}
</script>